package com.tbit.uqbike.object.pojo.vo;

import com.tbit.uqbike.object.pojo.ParamDate;
import com.tbit.uqbike.webmanager.util.csv.annotations.Csv;
import com.tbit.uqbike.webmanager.util.csv.annotations.Sum;

import java.math.BigDecimal;

/**
 * 预存款收支vo
 *
 * @Author:yanlun
 * @DATE: 2022/11/18
 */
public class AccountDayStatBalanceDetailVO extends ParamDate {

    private Integer accountId;
    /**
     * 区域
     */
    @Csv(name = "区域")
    private String accountName;
    /**
     * 日期
     */
    @Csv(name = "日期")
    private String date;
    /**
     * 用户充值
     */
    @Sum
    @Csv(name = "用户充值")
    private BigDecimal userRecharge;
    /**
     * 用户充值笔数
     */
    @Sum
    @Csv(name = "用户充值笔数")
    private Long userRechargeCount;
    /**
     * 手工充值
     */
    @Sum
    @Csv(name = "手工充值")
    private BigDecimal manualRecharge;
    /**
     * 手工充值笔数
     */
    @Sum
    @Csv(name = "手工充值笔数")
    private Long manualRechargeCount;
    /**
     * 骑行退款
     */
    @Sum
    @Csv(name = "骑行退款")
    private BigDecimal rideRefund;
    /**
     * 骑行退款总数
     */
    @Sum
    @Csv(name = "骑行退款总数")
    private Long rideRefundCount;
    /**
     * 用户退款
     */
    @Sum
    @Csv(name = "用户退款")
    private BigDecimal userRefund;
    /**
     * 用户退款笔数
     */
    @Sum
    @Csv(name = "用户退款笔数")
    private Long userRefundCount;
    /**
     * 手工扣款
     */
    @Sum
    @Csv(name = "手工扣款")
    private BigDecimal manualReduce;
    /**
     * 手工扣款笔数
     */
    @Sum
    @Csv(name = "手工扣款笔数")
    private Long manualReduceCount;
    /**
     * 骑行消费
     */
    @Sum
    @Csv(name = "骑行消费")
    private BigDecimal rideConsume;
    /**
     * 骑行消费笔数
     */
    @Sum
    @Csv(name = "骑行消费笔数")
    private Long rideConsumeCount;
    /**
     * 期初预存款
     */
    @Csv(name = "期初预存款")
    private BigDecimal termStartBalance;
    /**
     * 期末预存款
     */
    @Csv(name = "期末预存款")
    private BigDecimal termEndBalance;

    public AccountDayStatBalanceDetailVO() {
        fillData();
    }

    public Integer getAccountId() {
        return accountId;
    }

    public void setAccountId(Integer accountId) {
        this.accountId = accountId;
    }

    public String getAccountName() {
        return accountName;
    }

    public void setAccountName(String accountName) {
        this.accountName = accountName;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public BigDecimal getUserRecharge() {
        return userRecharge == null ? null : userRecharge.setScale(2, BigDecimal.ROUND_HALF_UP);
    }

    public void setUserRecharge(BigDecimal userRecharge) {
        this.userRecharge = userRecharge;
    }

    public Long getUserRechargeCount() {
        return userRechargeCount;
    }

    public void setUserRechargeCount(Long userRechargeCount) {
        this.userRechargeCount = userRechargeCount;
    }

    public BigDecimal getManualRecharge() {
        return manualRecharge == null ? null : manualRecharge.setScale(2, BigDecimal.ROUND_HALF_UP);
    }

    public void setManualRecharge(BigDecimal manualRecharge) {
        this.manualRecharge = manualRecharge;
    }

    public Long getManualRechargeCount() {
        return manualRechargeCount;
    }

    public void setManualRechargeCount(Long manualRechargeCount) {
        this.manualRechargeCount = manualRechargeCount;
    }

    public BigDecimal getRideRefund() {
        return rideRefund == null ? null : rideRefund.setScale(2, BigDecimal.ROUND_HALF_UP);
    }

    public void setRideRefund(BigDecimal rideRefund) {
        this.rideRefund = rideRefund;
    }

    public Long getRideRefundCount() {
        return rideRefundCount;
    }

    public void setRideRefundCount(Long rideRefundCount) {
        this.rideRefundCount = rideRefundCount;
    }

    public BigDecimal getUserRefund() {
        return userRefund == null ? null : userRefund.setScale(2, BigDecimal.ROUND_HALF_UP);
    }

    public void setUserRefund(BigDecimal userRefund) {
        this.userRefund = userRefund;
    }

    public Long getUserRefundCount() {
        return userRefundCount;
    }

    public void setUserRefundCount(Long userRefundCount) {
        this.userRefundCount = userRefundCount;
    }

    public BigDecimal getManualReduce() {
        return manualReduce == null ? null : manualReduce.setScale(2, BigDecimal.ROUND_HALF_UP);
    }

    public void setManualReduce(BigDecimal manualReduce) {
        this.manualReduce = manualReduce;
    }

    public Long getManualReduceCount() {
        return manualReduceCount;
    }

    public void setManualReduceCount(Long manualReduceCount) {
        this.manualReduceCount = manualReduceCount;
    }

    public BigDecimal getRideConsume() {
        return rideConsume == null ? null : rideConsume.setScale(2, BigDecimal.ROUND_HALF_UP);
    }

    public void setRideConsume(BigDecimal rideConsume) {
        this.rideConsume = rideConsume;
    }

    public Long getRideConsumeCount() {
        return rideConsumeCount;
    }

    public void setRideConsumeCount(Long rideConsumeCount) {
        this.rideConsumeCount = rideConsumeCount;
    }

    public BigDecimal getTermStartBalance() {
        return termStartBalance == null ? null : termStartBalance.setScale(2, BigDecimal.ROUND_HALF_UP);
    }

    public void setTermStartBalance(BigDecimal termStartBalance) {
        this.termStartBalance = termStartBalance;
    }

    public BigDecimal getTermEndBalance() {
        return termEndBalance == null ? null : termEndBalance.setScale(2, BigDecimal.ROUND_HALF_UP);
    }

    public void setTermEndBalance(BigDecimal termEndBalance) {
        this.termEndBalance = termEndBalance;
    }

    public void fillData() {
        BigDecimal bigDecimal = new BigDecimal(0);
        this.userRecharge = this.userRecharge == null ? bigDecimal : this.userRecharge;
        this.userRechargeCount = this.userRechargeCount == null ? 0L : this.userRechargeCount;
        this.manualRecharge = this.manualRecharge == null ? bigDecimal : this.manualRecharge;
        this.manualRechargeCount = this.manualRechargeCount == null ? 0L : this.manualRechargeCount;
        this.rideRefund = this.rideRefund == null ? bigDecimal : this.rideRefund;
        this.rideRefundCount = this.rideRefundCount == null ? 0L : this.rideRefundCount;
        this.userRefund = this.userRefund == null ? bigDecimal : this.userRefund;
        this.userRefundCount = this.userRefundCount == null ? 0L : this.userRefundCount;
        this.manualReduce = this.manualReduce == null ? bigDecimal : this.manualReduce;
        this.manualReduceCount = this.manualReduceCount == null ? 0L : this.manualReduceCount;
        this.rideConsume = this.rideConsume == null ? bigDecimal : this.rideConsume;
        this.rideConsumeCount = this.rideConsumeCount == null ? 0L : this.rideConsumeCount;
        this.termStartBalance = this.termStartBalance == null ? bigDecimal : this.termStartBalance;
        this.termEndBalance = this.termEndBalance == null ? bigDecimal : this.termEndBalance;
    }


}
